<?php 
	$product = $this->product;
	
?>

<div class="block">
	<h3 class="title">Chi tiết sản phẩm</h3>
	<div id="detail-product" class="content" >
		<div class="basic-info clearfix">
			<div class="box-image clearfix">
			
						
			
		<script>

        jQuery(document).ready(function ($) {

            var _SlideshowTransitions = [
            //Fade in L
                {$Duration: 1200, $During: { $Left: [0.3, 0.7] }, $FlyDirection: 1, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $ScaleHorizontal: 0.3, $Opacity: 2 }
            //Fade out R
                , { $Duration: 1200, $SlideOut: true, $FlyDirection: 2, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $ScaleHorizontal: 0.3, $Opacity: 2 }
            //Fade in R
                , { $Duration: 1200, $During: { $Left: [0.3, 0.7] }, $FlyDirection: 2, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $ScaleHorizontal: 0.3, $Opacity: 2 }
            //Fade out L
                , { $Duration: 1200, $SlideOut: true, $FlyDirection: 1, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $ScaleHorizontal: 0.3, $Opacity: 2 }

            //Fade in T
                , { $Duration: 1200, $During: { $Top: [0.3, 0.7] }, $FlyDirection: 4, $Easing: { $Top: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $ScaleVertical: 0.3, $Opacity: 2 }
            //Fade out B
                , { $Duration: 1200, $SlideOut: true, $FlyDirection: 8, $Easing: { $Top: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $ScaleVertical: 0.3, $Opacity: 2 }
            //Fade in B
                , { $Duration: 1200, $During: { $Top: [0.3, 0.7] }, $FlyDirection: 8, $Easing: { $Top: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $ScaleVertical: 0.3, $Opacity: 2 }
            //Fade out T
                , { $Duration: 1200, $SlideOut: true, $FlyDirection: 4, $Easing: { $Top: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $ScaleVertical: 0.3, $Opacity: 2 }

            //Fade in LR
                , { $Duration: 1200, $Cols: 2, $During: { $Left: [0.3, 0.7] }, $FlyDirection: 1, $ChessMode: { $Column: 3 }, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $ScaleHorizontal: 0.3, $Opacity: 2 }
            //Fade out LR
                , { $Duration: 1200, $Cols: 2, $SlideOut: true, $FlyDirection: 1, $ChessMode: { $Column: 3 }, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $ScaleHorizontal: 0.3, $Opacity: 2 }
            //Fade in TB
                , { $Duration: 1200, $Rows: 2, $During: { $Top: [0.3, 0.7] }, $FlyDirection: 4, $ChessMode: { $Row: 12 }, $Easing: { $Top: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $ScaleVertical: 0.3, $Opacity: 2 }
            //Fade out TB
                , { $Duration: 1200, $Rows: 2, $SlideOut: true, $FlyDirection: 4, $ChessMode: { $Row: 12 }, $Easing: { $Top: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $ScaleVertical: 0.3, $Opacity: 2 }

            //Fade in LR Chess
                , { $Duration: 1200, $Cols: 2, $During: { $Top: [0.3, 0.7] }, $FlyDirection: 4, $ChessMode: { $Column: 12 }, $Easing: { $Top: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $ScaleVertical: 0.3, $Opacity: 2 }
            //Fade out LR Chess
                , { $Duration: 1200, $Cols: 2, $SlideOut: true, $FlyDirection: 8, $ChessMode: { $Column: 12 }, $Easing: { $Top: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $ScaleVertical: 0.3, $Opacity: 2 }
            //Fade in TB Chess
                , { $Duration: 1200, $Rows: 2, $During: { $Left: [0.3, 0.7] }, $FlyDirection: 1, $ChessMode: { $Row: 3 }, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $ScaleHorizontal: 0.3, $Opacity: 2 }
            //Fade out TB Chess
                , { $Duration: 1200, $Rows: 2, $SlideOut: true, $FlyDirection: 2, $ChessMode: { $Row: 3 }, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $ScaleHorizontal: 0.3, $Opacity: 2 }

            //Fade in Corners
                , { $Duration: 1200, $Cols: 2, $Rows: 2, $During: { $Left: [0.3, 0.7], $Top: [0.3, 0.7] }, $FlyDirection: 5, $ChessMode: { $Column: 3, $Row: 12 }, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Top: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $ScaleHorizontal: 0.3, $ScaleVertical: 0.3, $Opacity: 2 }
            //Fade out Corners
                , { $Duration: 1200, $Cols: 2, $Rows: 2, $During: { $Left: [0.3, 0.7], $Top: [0.3, 0.7] }, $SlideOut: true, $FlyDirection: 5, $ChessMode: { $Column: 3, $Row: 12 }, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Top: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $ScaleHorizontal: 0.3, $ScaleVertical: 0.3, $Opacity: 2 }

            //Fade Clip in H
                , { $Duration: 1200, $Delay: 20, $Clip: 3, $Assembly: 260, $Easing: { $Clip: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 }
            //Fade Clip out H
                , { $Duration: 1200, $Delay: 20, $Clip: 3, $SlideOut: true, $Assembly: 260, $Easing: { $Clip: $JssorEasing$.$EaseOutCubic, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 }
            //Fade Clip in V
                , { $Duration: 1200, $Delay: 20, $Clip: 12, $Assembly: 260, $Easing: { $Clip: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 }
            //Fade Clip out V
                , { $Duration: 1200, $Delay: 20, $Clip: 12, $SlideOut: true, $Assembly: 260, $Easing: { $Clip: $JssorEasing$.$EaseOutCubic, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 }
                ];

            var options = {
                $AutoPlay: true,                                    //[Optional] Whether to auto play, to enable slideshow, this option must be set to true, default value is false
                $AutoPlayInterval: 1500,                            //[Optional] Interval (in milliseconds) to go for next slide since the previous stopped if the slider is auto playing, default value is 3000
                $PauseOnHover: 1,                                //[Optional] Whether to pause when mouse over if a slider is auto playing, 0 no pause, 1 pause for desktop, 2 pause for touch device, 3 pause for desktop and touch device, default value is 1

                $DragOrientation: 3,                                //[Optional] Orientation to drag slide, 0 no drag, 1 horizental, 2 vertical, 3 either, default value is 1 (Note that the $DragOrientation should be the same as $PlayOrientation when $DisplayPieces is greater than 1, or parking position is not 0)
                $ArrowKeyNavigation: true,   			            //[Optional] Allows keyboard (arrow key) navigation or not, default value is false
                $SlideDuration: 800,                                //Specifies default duration (swipe) for slide in milliseconds

                $SlideshowOptions: {                                //[Optional] Options to specify and enable slideshow or not
                    $Class: $JssorSlideshowRunner$,                 //[Required] Class to create instance of slideshow
                    $Transitions: _SlideshowTransitions,            //[Required] An array of slideshow transitions to play slideshow
                    $TransitionsOrder: 1,                           //[Optional] The way to choose transition to play slide, 1 Sequence, 0 Random
                    $ShowLink: true                                    //[Optional] Whether to bring slide link on top of the slider when slideshow is running, default value is false
                },

                $ArrowNavigatorOptions: {                       //[Optional] Options to specify and enable arrow navigator or not
                    $Class: $JssorArrowNavigator$,              //[Requried] Class to create arrow navigator instance
                    $ChanceToShow: 1                               //[Required] 0 Never, 1 Mouse Over, 2 Always
                },

                $ThumbnailNavigatorOptions: {                       //[Optional] Options to specify and enable thumbnail navigator or not
                    $Class: $JssorThumbnailNavigator$,              //[Required] Class to create thumbnail navigator instance
                    $ChanceToShow: 2,                               //[Required] 0 Never, 1 Mouse Over, 2 Always

                    $ActionMode: 1,                                 //[Optional] 0 None, 1 act by click, 2 act by mouse hover, 3 both, default value is 1
                    $SpacingX: 8,                                   //[Optional] Horizontal space between each thumbnail in pixel, default value is 0
                    $DisplayPieces: 10,                             //[Optional] Number of pieces to display, default value is 1
                    $ParkingPosition: 360                          //[Optional] The offset position to park thumbnail
                }
            };

            var jssor_slider1 = new $JssorSlider$("detail-slider", options);
            //responsive code begin
            //you can remove responsive code if you don't want the slider scales while window resizes
            function ScaleSlider() {
                var parentWidth = jssor_slider1.$Elmt.parentNode.clientWidth;
                if (parentWidth)
                    jssor_slider1.$SetScaleWidth(Math.max(Math.min(parentWidth, 800), 300));
                else
                    window.setTimeout(ScaleSlider, 30);
            }

            ScaleSlider();

            if (!navigator.userAgent.match(/(iPhone|iPod|iPad|BlackBerry|IEMobile)/)) {
                $(window).bind('resize', ScaleSlider);
            }


            //if (navigator.userAgent.match(/(iPhone|iPod|iPad)/)) {
            //    $(window).bind("orientationchange", ScaleSlider);
            //}
            //responsive code end
        });
    </script>
						    <!-- Jssor Slider Begin -->
						    <!-- You can move inline styles (except 'top', 'left', 'width' and 'height') to css file or css block. -->
						    <!-- Thay doi mau nen -->
						    <div id="detail-slider" style="position: relative; top: 0px; left: 0px; width: 420px;
						        height: 500px; background: #ffffff; overflow: hidden; text-align: center;">
						
						        <!-- Loading Screen -->
						        
						        <div u="loading" style="position: absolute; top: 0px; left: 0px;">
						            <div style="filter: alpha(opacity=70); opacity:0.7; position: absolute; display: block;
						                background-color: #000000; top: 0px; left: 0px;width: 100%;height:100%;">
						            </div>
						            <div style="position: absolute; display: block; background: url(<?php echo PUBLIC_RESOURCE.'/skins/default/js/jssor-slider'?>/img/loading.gif) no-repeat center center;
						                top: 0px; left: 0px;width: 100%;height:100%;">
						                
						            </div>
						        </div>
						 		
						        <!-- Slides Container -->
						        <div u="slides" style="cursor: move; position: absolute; left: 10px; top: 0px; width: 400px; height: 400px; overflow: hidden; margin:0px auto;">
						            
						            <div>
						                <img u="image" src="<?php echo PUBLIC_RESOURCE.'/uploads/images/products/400x400/'.$product['product_image']?>" />
						                <img u="thumb" src="<?php echo PUBLIC_RESOURCE.'/uploads/images/products/thumbs/'.$product['product_image']?>" />
						            </div>
						            <?php 
						            	$images = $product->findDependentRowset('Application_Model_DbTable_ProductImage');
						            	if(count($images)):
						            		foreach ($images as $image):
						          
						            ?>
						            	<div>
						                <img u="image" src="<?php echo PUBLIC_RESOURCE.'/uploads/images/products/400x400/'.$image['product_image_name']?>" />
						                <img u="thumb" src="<?php echo PUBLIC_RESOURCE.'/uploads/images/products/thumbs/'.$image['product_image_name']?>" />
						            </div>
						           	<?php 
						           			endforeach;
						           		endif;
						           	?>
						        </div>
						        
						        <!-- Arrow Navigator Skin Begin -->
						        <style>
						            /* jssor slider arrow navigator skin 05 css */
						            /*
						            .jssora05l              (normal)
						            .jssora05r              (normal)
						            .jssora05l:hover        (normal mouseover)
						            .jssora05r:hover        (normal mouseover)
						            .jssora05ldn            (mousedown)
						            .jssora05rdn            (mousedown)
						            */
						            .jssora05l, .jssora05r, .jssora05ldn, .jssora05rdn
						            {
						            	position: absolute;
						            	cursor: pointer;
						            	display: block;
						                background: url(<?php echo PUBLIC_RESOURCE.'/skins/default/js/jssor-slider/img/a14.png'?>) no-repeat;
						                overflow:hidden;
										z-index: 1000;
						            }
									
						            .jssora05l, jssora05l:hover { background-position: 0px -35px; }
						            .jssora05r, jssora05r:hover { background-position: -70px -35px; }
						            .jssora05l:hover { background-position: -0px -35px; }
						            .jssora05r:hover { background-position: -70px -35px; }
									
						            .jssora05ldn { background-position: -0px -35px; }
						            .jssora05rdn { background-position: -70px -35x; }
									
						        </style>
						        <!-- Arrow Left -->  
						        
						        <span u="arrowleft" class="jssora05l" style="width: 55px; height: 55px; top: 150px; left: 0px;">
						        </span>
						        <!-- Arrow Right -->
						        <span u="arrowright" class="jssora05r" style="width: 55px; height: 55px; top: 150px; right: 0px">
						        </span>
						        <!-- Arrow Navigator Skin End -->
						        
						        <!-- Thumbnail Navigator Skin Begin -->
						        <div u="thumbnavigator" class="jssort01" style="position: absolute; width: 400px; height: 100px; left:0px; bottom: 0px;">
						            <!-- Thumbnail Item Skin Begin -->
						            <style>
						                /* jssor slider thumbnail navigator skin 01 css */
						                /*
						                .jssort01 .p           (normal)
						                .jssort01 .p:hover     (normal mouseover)
						                .jssort01 .pav           (active)
						                .jssort01 .pav:hover     (active mouseover)
						                .jssort01 .pdn           (mousedown)
						                */
						                .jssort01 .w {
						                    position: absolute;
						                    top: 0px;
						                    left: 0px;
						                    width: 100%;
						                    height: 100%;
						                }
						
						                .jssort01 .c {
						                    position: absolute;
						                    top: 0px;
						                    left: 0px;
						                    width: 68px;
						                    height: 68px;
						                    border: #000 0px solid;
						                }
						
						                .jssort01 .p:hover .c, .jssort01 .pav:hover .c, .jssort01 .pav .c {
						                    background: url(<?php echo PUBLIC_RESOURCE.'/skins/default/js/jssor-slider'?>/img/t01.png) center center;
						                    
						                    border-width: 0px;
						                    top: 2px;
						                    left: 2px;
						                    width: 68px;
						                    height: 68px;
						                }
						
						                .jssort01 .p:hover .c, .jssort01 .pav:hover .c {
						                    top: 0px;
						                    left: 0px;
						                    width: 70px;
						                    height: 70px;
						                    border: #fff 1px solid;
						                }
						            </style>
						            <div u="slides" style="cursor: move;">
						                <div u="prototype" class="p" style="position: absolute; width: 72px; height: 72px; top: 0; left: 0;">
						                    <div class=w><thumbnailtemplate style=" width: 100%; height: 100%; border: none;position:absolute; top: 0; left: 0;"></thumbnailtemplate></div>
						                    <div class=c>
						                    </div>
						                </div>
						            </div>
						            <!-- Thumbnail Item Skin End -->
						        </div>
						        <!-- Thumbnail Navigator Skin End -->
						     
						    </div>
						    <!-- Jssor Slider End -->
				
			</div><!--  End box image -->
			<div class="box-basic-info">

				<div class="product-block-info">
					<h3><?php echo $product['product_name']?></h3>
				</div>
				<div class="product-block-info">
					<h4>Hãng sản xuất: <?php echo $product->findParentRow('Application_Model_DbTable_Manufacture')->manufacture_name?></h4>
				</div>
				<div class="product-block-info">
					<h4 class="price">Price: <?php echo number_format($product['product_price'])?> vnd</h4>
				</div>

				<div class="product-block-info">
					<div class="box-order clearfix">
						<form id="frm-order" method="post" action="<?php echo $this->baseUrl('/order/insert/lang/'.LANG)?>">
							<input type="hidden" value="<?php echo $product['product_id']?>" name='id' />
							<label>Chọn số lượng</label> 
							<select name='qty'>
								<?php 
									for($i=1;$i<=10;$i++){
										echo "<option value=$i>$i</option>";		
									}
								?>
								
							</select> 
							
							<!-- <input type="hidden" value="1" name='qty' />-->
							<span class="image-submit">Mua online</span>

							<script>
								$(document).ready(function(){
									$("#frm-order .image-submit").click(function(){
										$("#frm-order").submit();
									});
								});
							</script>
						</form>
					</div>
				</div>
			</div>
		</div>
        <div class='line'></div>
		<div class="detail-info">
			<div class="tab-list">
				<ul>
					<li><a href="#detail" class="active"><h4>Thông số kỹ thuật</h4></a></li>
					<li><a href="#describe"><h4>Đánh giá chi tiết</h4></a></li>
				</ul>
				<div class="clearb"></div>
			</div>

			<div id="detail" class="tab-item">
				<table>
					<tr>
						<td>Vi xử lý</td>
						<td><?php echo $product['product_cpu']?></td>
					</tr>
					<tr>
						<td>Bộ nhớ trong</td>
						<td><?php echo $product['product_hdd']?></td>
					</tr>
					<tr>
						<td>Ram</td>
						<td><?php echo $product['product_ram']?></td>
					</tr>
					<tr>
						<td>card màn hình</td>
						<td><?php echo $product['product_video_card']?></td>
					</tr>
					<tr>
						<td>Màn hình</td>
						<td><?php echo $product['product_display']?></td>
					</tr>
					<tr>
						<td>Hệ điều hành</td>
						<td><?php echo $product['product_operator']?></td>
					</tr>
					<tr>
						<td>Camera </td>
						<td><?php echo $product['product_camera']?></td>
					</tr>
					<tr>
						<td>Camera phụ</td>
						<td><?php echo $product['product_camera_sub']?></td>
					</tr>
					<tr>
						<td>Kết nối</td>
						<td><?php echo $product['product_connect']?></td>
					</tr>
					<tr>
						<td>Tai nghe</td>
						<td><?php echo $product['product_ear_plugin']?></td>
					</tr>
					<tr>
						<td>Pin</td>
						<td><?php echo $product['product_battery']?></td>
					</tr>
					<tr>
						<td>Cảm ưng</td>
						<td><?php echo $product['product_touch']?></td>
					</tr>
				</table>
			</div>
			<div id="describe" class="tab-item">
				<?php echo $product['product_describe_vi']?>
			</div>
		</div>
		
		<!-- facebook comment -->
		<div class='facebook'>
			<div class="fb-comments" data-href="<?php echo FACEBOOK_URL.$_SERVER["REQUEST_URI"];?>" data-width="720" data-numposts="5" data-colorscheme="light"></div>
		</div>
	</div><!-- end content -->

</div>